using System;
using System.Collections.Generic;

namespace CMS.Core.Domain
{
    /// <summary>
    /// ChucNang object for NHibernate mapped table ChucNang.
    /// </summary>
    [Serializable]
    public class ChucNang : DomainObject<System.Int32>
    {
        private System.Int32 _MaCapCha;
        private System.String _TenChucNang;
        private System.String _MoTa;
        private System.String _DuongDan;
        private System.Byte _ThuTu;
        private System.Boolean _TrangThai = false;
        private System.Boolean _IsLink = false;
        private System.Boolean _IsQuyen = false;
        private System.Boolean _IsView = false;
        private System.Byte _NodeNumber;
       
        //private IList<PhanQuyenNhom> _PhanQuyenNhoms = new List<PhanQuyenNhom>();
        //private IList<PhanQuyenNguoiSuDung> _PhanQuyenNguoiSuDungs = new List<PhanQuyenNguoiSuDung>();
        private IList<NhomNguoiSuDung> _NhomNguoiSuDungs = new List<NhomNguoiSuDung>();
        private IList<NguoiSuDung> _NguoiSuDungs = new List<NguoiSuDung>();

        public ChucNang()
        {
        }

        public ChucNang(System.Int32 id)
        {
            base.ID = id;
        }

        public virtual System.Int32 MaCapCha
        {
            get { return _MaCapCha; }
            set { _MaCapCha = value; }
        }

        public virtual System.String TenChucNang
        {
            get { return _TenChucNang; }
            set { _TenChucNang = value; }
        }

        public virtual System.String MoTa
        {
            get { return _MoTa; }
            set { _MoTa = value; }
        }

        public virtual System.String DuongDan
        {
            get { return _DuongDan; }
            set { _DuongDan = value; }
        }

        public virtual System.Byte ThuTu
        {
            get { return _ThuTu; }
            set { _ThuTu = value; }
        }

        public virtual System.Boolean TrangThai
        {
            get { return _TrangThai; }
            set { _TrangThai = value; }
        }

        public virtual System.Boolean IsLink
        {
            get { return _IsLink; }
            set { _IsLink = value; }
        }
        public virtual System.Boolean IsView
        {
            get { return _IsView; }
            set { _IsView = value; }
        }

        public virtual System.Boolean IsQuyen
        {
            get { return _IsQuyen; }
            set { _IsQuyen = value; }
        }

        //public virtual IList<PhanQuyenNhom> PhanQuyenNhoms
        //{
        //    get { return _PhanQuyenNhoms; }
        //    set { _PhanQuyenNhoms = value; }
        //}

        //public virtual IList<PhanQuyenNguoiSuDung> PhanQuyenNguoiSuDungs
        //{
        //    get { return _PhanQuyenNguoiSuDungs; }
        //    set { _PhanQuyenNguoiSuDungs = value; }
        //}

        public virtual IList<NhomNguoiSuDung> NhomNguoiSuDungs
        {
            get { return _NhomNguoiSuDungs; }
            set { _NhomNguoiSuDungs = value; }
        }

        public virtual IList<NguoiSuDung> NguoiSuDungs
        {
            get { return _NguoiSuDungs; }
            set { _NguoiSuDungs = value; }
        }



        public virtual System.Byte NodeNumber
        {
            get { return _NodeNumber; }
            set { _NodeNumber = value; }
        }

        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }
}
